package com.mingtu.jgspatrol.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mingtu.jgspatrol.R;
import com.mingtu.jgspatrol.bean.WhiteListBean;

public class CarInfoListAdapter extends BaseQuickAdapter<WhiteListBean.PageBean.ListBean, BaseViewHolder> {

    public CarInfoListAdapter() {
        super(R.layout.item_car_number_info);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, WhiteListBean.PageBean.ListBean dataBean) {
        String owner = dataBean.getOwner();
        String phoneNo = dataBean.getPhoneNo();
        String plateNo = dataBean.getPlateNo();
        helper.addOnClickListener(R.id.tv_delete);
        try {
            helper.setText(R.id.tv_car_number, plateNo);
            helper.setText(R.id.tv_name, owner);
            helper.setText(R.id.tv_tel, phoneNo);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

    }

}
